import request from '@/utils/request'

// 删除部门
export function delDepartment(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

// 修改部门详情
export function editDepartment(data) {
  return request({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data
  })
}

// 获取部门详情
export function getDepartmentDetail(id) {
  return request({
    method: 'GET',
    url: '/company/department/' + id
  })
}

// 新增部门
export function addDeptDialog(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

// 获取部分负责人
export function getSimple() {
  return request({
    method: 'get',
    url: '/sys/user/simple'
  })
}

// 获取部门列表
export function getDepartment() {
  return request({
    method: 'get',
    url: '/company/department'
  })
}
